package com.ruoyi.biz.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.biz.mapper.BizCourseMaterialLearnRecordMapper;
import com.ruoyi.biz.domain.BizCourseMaterialLearnRecord;
import com.ruoyi.biz.service.IBizCourseMaterialLearnRecordService;
import com.ruoyi.common.core.text.Convert;

/**
 * 课程ppt,视频学习记录Service业务层处理
 * 
 * @author fmi110
 * @date 2021-11-15
 */
@Service
public class BizCourseMaterialLearnRecordServiceImpl implements IBizCourseMaterialLearnRecordService 
{
    @Autowired
    private BizCourseMaterialLearnRecordMapper bizCourseMaterialLearnRecordMapper;

    /**
     * 查询课程ppt,视频学习记录
     * 
     * @param id 课程ppt,视频学习记录ID
     * @return 课程ppt,视频学习记录
     */
    @Override
    public BizCourseMaterialLearnRecord selectBizCourseMaterialLearnRecordById(Long id)
    {
        return bizCourseMaterialLearnRecordMapper.selectBizCourseMaterialLearnRecordById(id);
    }

    /**
     * 查询课程ppt,视频学习记录列表
     * 
     * @param bizCourseMaterialLearnRecord 课程ppt,视频学习记录
     * @return 课程ppt,视频学习记录
     */
    @Override
    public List<BizCourseMaterialLearnRecord> selectBizCourseMaterialLearnRecordList(BizCourseMaterialLearnRecord bizCourseMaterialLearnRecord)
    {
        return bizCourseMaterialLearnRecordMapper.selectBizCourseMaterialLearnRecordList(bizCourseMaterialLearnRecord);
    }

    /**
     * 新增课程ppt,视频学习记录
     * 
     * @param bizCourseMaterialLearnRecord 课程ppt,视频学习记录
     * @return 结果
     */
    @Override
    public int insertBizCourseMaterialLearnRecord(BizCourseMaterialLearnRecord bizCourseMaterialLearnRecord)
    {
        bizCourseMaterialLearnRecord.setCreateTime(DateUtils.getNowDate());
        return bizCourseMaterialLearnRecordMapper.insertBizCourseMaterialLearnRecord(bizCourseMaterialLearnRecord);
    }

    /**
     * 修改课程ppt,视频学习记录
     * 
     * @param bizCourseMaterialLearnRecord 课程ppt,视频学习记录
     * @return 结果
     */
    @Override
    public int updateBizCourseMaterialLearnRecord(BizCourseMaterialLearnRecord bizCourseMaterialLearnRecord)
    {
        bizCourseMaterialLearnRecord.setUpdateTime(DateUtils.getNowDate());
        return bizCourseMaterialLearnRecordMapper.updateBizCourseMaterialLearnRecord(bizCourseMaterialLearnRecord);
    }

    /**
     * 删除课程ppt,视频学习记录对象
     * 
     * @param ids 需要删除的数据ID
     * @return 结果
     */
    @Override
    public int deleteBizCourseMaterialLearnRecordByIds(String ids)
    {
        return bizCourseMaterialLearnRecordMapper.deleteBizCourseMaterialLearnRecordByIds(Convert.toStrArray(ids));
    }

    /**
     * 删除课程ppt,视频学习记录信息
     * 
     * @param id 课程ppt,视频学习记录ID
     * @return 结果
     */
    @Override
    public int deleteBizCourseMaterialLearnRecordById(Long id)
    {
        return bizCourseMaterialLearnRecordMapper.deleteBizCourseMaterialLearnRecordById(id);
    }
}
